﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace FinanceCalculators.Views.HomeInsurance
{
    public partial class HomeInsurance : PhoneApplicationPage
    {
        public HomeInsurance()
        {
            InitializeComponent();
        }

        //private void Calculate_Click(object sender, RoutedEventArgs e)
        //{
        //    string IdentityTheftLevel = "";
        //    if (Convert.ToBoolean(radioButton1.IsChecked))
        //        IdentityTheftLevel = "Converge";
        //    if (Convert.ToBoolean(radioButton2.IsChecked))
        //        IdentityTheftLevel = "No Coverage";
        //    NavigationService.Navigate(new Uri("/Views/HomeInsurance/InsuranceResult.xaml?tl=" + (ListPicker2.SelectedItem as ListBoxItem).Content.ToString() + "&ir=" + (ListPicker3.SelectedItem as ListBoxItem).Content.ToString() + "&IdentityTheftLevel=" + IdentityTheftLevel, UriKind.Relative));

        //}

        private void ApplicationBarIconButton_Click(object sender, EventArgs e)
        {
            string IdentityTheftLevel = "";
            if (Convert.ToBoolean(radioButton1.IsChecked))
                IdentityTheftLevel = "Converge";
            if (Convert.ToBoolean(radioButton2.IsChecked))
                IdentityTheftLevel = "No Coverage";
            NavigationService.Navigate(new Uri("/Views/Result/ResultPage.xaml?tl=" + (ListPicker2.SelectedItem as ListBoxItem).Content.ToString() + "&ir1=" + (ListPicker3.SelectedItem as ListBoxItem).Content.ToString() + "&IdentityTheftLevel=" + IdentityTheftLevel, UriKind.Relative));
        }
    }
}